<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>01-比例高度-视口高度</title>

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        div {
            width: 50vw;
            /*视口宽度的50%*/
            height: 50vh;
            background-color: pink;
        }
    </style>
</head>

<body>

    <div></div>

</body>

</html>